$(function () {
   obj.init();
});
var obj = new function () {
    'use strict';
    return {
        form:null,
        frame:null,
        depTag:null,
        init:function () {
            this.frame = $('iframe');
            this.depTag = $('[name=dep]:checked').val();
            this.frame[0].contentWindow.location = baseUrl + 'hrm/attendance/attendList?depTag='+this.depTag;
            this.listener();
        },
        listener:function () {
            var $this = this;

            //工具栏点击
            $('#westPanel a').click(function () {
                $('#westPanel a').each(function () {
                    $(this).find('input').removeAttr("checked");
                    var attr = $(this).attr('style');
                    if($(this).hasClass('modal-btn-checked')){
                        $(this).removeClass('modal-btn-checked');
                    }
                });
                $(this).find('input').attr('checked','checked').prop("checked",'checked');
                $(this).addClass('modal-btn-checked');
                $this.depTag = $('[name=dep]:checked').val();
                $this.frame[0].contentWindow.location = baseUrl + 'hrm/attendance/attendList?depTag='+$this.depTag;
            });
        },
        funObj:function () {
            var $this = this;
            return {

            }
        }
    }
};